package com.mall.mymall.mapper;

import com.mall.mymall.dao.dto.OrderCountDto;
import com.mall.mymall.dao.dto.OrderSelectDto;
import com.mall.mymall.dao.dto.query.OrderQuery;
import com.mall.mymall.dao.entity.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 十里坡
 * @since 2025-03-06
 */
public interface OrdersMapper extends BaseMapper<Orders> {

    List<OrderSelectDto> selectQrderSelectDto(@Param("query") OrderQuery query);

    Boolean updateStatusById(@Param("orderStatus") String orderStatus,@Param("orderId") Integer orderId);


    List<OrderCountDto> orderCountByDay(@Param("beginTime") LocalDate beginTime, @Param("endTime")LocalDate endTime);
}
